package org.finesys.system.api.feign;

import org.finesys.common.constants.ServerConstants;
import org.finesys.common.core.module.R;
import org.finesys.common.feign.annotation.NoToken;
import org.finesys.system.api.dto.ClientDetailsDto;
import org.finesys.system.api.feignFactory.ClientServiceApiFallbackFactory;
import org.finesys.system.api.service.ClientService;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(contextId = "clientServiceApi", value = ServerConstants.SYSTEM_SERVER, fallbackFactory = ClientServiceApiFallbackFactory.class)
public interface ClientServiceApi extends ClientService {

    @NoToken
    @GetMapping(value = "/client/getByClientId/{clientId}")
    R<ClientDetailsDto> getByClientId(@PathVariable("clientId") String clientId);
}
